<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * Work with streaming content.
<span class='line'>  3</span>  *
<span class='line'>  4</span>  * The stream class provides methods that support multimedia streaming.
<span class='line'>  5</span>  *   The stream class uses the following semantics: one message is one
<span class='line'>  6</span>  *   packet of data; delivery is unacknowleged and unreliable; the consumer
<span class='line'>  7</span>  *   can specify quality of service parameters that the server can try to
<span class='line'>  8</span>  *   adhere to; lower-priority messages may be discarded in favour of high
<span class='line'>  9</span>  *   priority messages.
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * @name Stream
<span class='line'> 12</span>  * @exports Stream as api.Stream
<span class='line'> 13</span>  * @class
<span class='line'> 14</span>  */</span><span class="WHIT">
<span class='line'> 15</span> 
<span class='line'> 16</span> 
<span class='line'> 17</span> </span><span class="COMM">/**
<span class='line'> 18</span>  * Confirm the requested qos.
<span class='line'> 19</span>  *
<span class='line'> 20</span>  * This method tells the client that the requested QoS levels could
<span class='line'> 21</span>  *     be handled by the server.  The requested QoS applies to all active
<span class='line'> 22</span>  *     consumers until a new QoS is defined.
<span class='line'> 23</span>  *
<span class='line'> 24</span>  * @name Stream#qosOk
<span class='line'> 25</span>  * @event
<span class='line'> 26</span>  * 
<span class='line'> 27</span>  */</span><span class="WHIT">
<span class='line'> 28</span> 
<span class='line'> 29</span> </span><span class="COMM">/**
<span class='line'> 30</span>  * Confirm a new consumer.
<span class='line'> 31</span>  *
<span class='line'> 32</span>  * This method provides the client with a consumer tag which it may
<span class='line'> 33</span>  *     use in methods that work with the consumer.
<span class='line'> 34</span>  *
<span class='line'> 35</span>  * @name Stream#consumeOk
<span class='line'> 36</span>  * @event
<span class='line'> 37</span>  * @param {String} consumerTag Identifier for the consumer, valid within the current connection.
<span class='line'> 38</span>  */</span><span class="WHIT">
<span class='line'> 39</span> 
<span class='line'> 40</span> </span><span class="COMM">/**
<span class='line'> 41</span>  * Confirm a cancelled consumer.
<span class='line'> 42</span>  *
<span class='line'> 43</span>  * This method confirms that the cancellation was completed.
<span class='line'> 44</span>  *
<span class='line'> 45</span>  * @name Stream#cancelOk
<span class='line'> 46</span>  * @event
<span class='line'> 47</span>  * @param {String} consumerTag Identifier for the consumer, valid within the current connection.
<span class='line'> 48</span>  */</span><span class="WHIT">
<span class='line'> 49</span> 
<span class='line'> 50</span> </span><span class="COMM">/**
<span class='line'> 51</span>  * Return a failed message.
<span class='line'> 52</span>  *
<span class='line'> 53</span>  * This method returns an undeliverable message that was published
<span class='line'> 54</span>  *     with the "immediate" flag set, or an unroutable message published
<span class='line'> 55</span>  *     with the "mandatory" flag set. The reply code and text provide
<span class='line'> 56</span>  *     information about the reason that the message was undeliverable.
<span class='line'> 57</span>  *
<span class='line'> 58</span>  * @name Stream#return
<span class='line'> 59</span>  * @event
<span class='line'> 60</span>  * @param {Number} replyCode The reply code. The AMQ reply codes are defined in AMQ RFC 011.
<span class='line'> 61</span>  * @param {String} replyText The localised reply text.  This text can be logged as an aid to
<span class='line'> 62</span>  *   resolving issues.
<span class='line'> 63</span>  * @param {String} exchange The exchange name is a client-selected string that identifies
<span class='line'> 64</span>  *       the exchange for publish methods.  Exchange names may consist
<span class='line'> 65</span>  *       of any mixture of digits, letters, and underscores.  Exchange
<span class='line'> 66</span>  *       names are scoped by the virtual host.
<span class='line'> 67</span>  * @param {String} routingKey Specifies the routing key name specified when the message was
<span class='line'> 68</span>  *       published.
<span class='line'> 69</span>  */</span><span class="WHIT">
<span class='line'> 70</span> 
<span class='line'> 71</span> </span><span class="COMM">/**
<span class='line'> 72</span>  * Notify the client of a consumer message.
<span class='line'> 73</span>  *
<span class='line'> 74</span>  * This method delivers a message to the client, via a consumer.  In
<span class='line'> 75</span>  *     the asynchronous message delivery model, the client starts a
<span class='line'> 76</span>  *     consumer using the Consume method, then the server responds with
<span class='line'> 77</span>  *     Deliver methods as and when messages arrive for that consumer.
<span class='line'> 78</span>  *
<span class='line'> 79</span>  * @name Stream#deliver
<span class='line'> 80</span>  * @event
<span class='line'> 81</span>  * @param {String} consumerTag Identifier for the consumer, valid within the current connection.
<span class='line'> 82</span>  * @param {Number} deliveryTag The server-assigned and channel-specific delivery tag
<span class='line'> 83</span>  * @param {String} exchange The exchange name is a client-selected string that identifies
<span class='line'> 84</span>  *       the exchange for publish methods.  Exchange names may consist
<span class='line'> 85</span>  *       of any mixture of digits, letters, and underscores.  Exchange
<span class='line'> 86</span>  *       names are scoped by the virtual host.
<span class='line'> 87</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'> 88</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'> 89</span>  *     underscores.
<span class='line'> 90</span>  */</span><span class="WHIT">
<span class='line'> 91</span> 
<span class='line'> 92</span> </span><span class="COMM">/**
<span class='line'> 93</span>  * MIME content type
<span class='line'> 94</span>  *
<span class='line'> 95</span>  * @name Stream#contentType
<span class='line'> 96</span>  * @field
<span class='line'> 97</span>  * @type String
<span class='line'> 98</span>  */</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="COMM">/**
<span class='line'>100</span>  * MIME content encoding
<span class='line'>101</span>  *
<span class='line'>102</span>  * @name Stream#contentEncoding
<span class='line'>103</span>  * @field
<span class='line'>104</span>  * @type String
<span class='line'>105</span>  */</span><span class="WHIT">
<span class='line'>106</span> </span><span class="COMM">/**
<span class='line'>107</span>  * Message header field table
<span class='line'>108</span>  *
<span class='line'>109</span>  * @name Stream#headers
<span class='line'>110</span>  * @field
<span class='line'>111</span>  * @type Object
<span class='line'>112</span>  */</span><span class="WHIT">
<span class='line'>113</span> </span><span class="COMM">/**
<span class='line'>114</span>  * The message priority, 0 to 9
<span class='line'>115</span>  *
<span class='line'>116</span>  * @name Stream#priority
<span class='line'>117</span>  * @field
<span class='line'>118</span>  * @type Number
<span class='line'>119</span>  */</span><span class="WHIT">
<span class='line'>120</span> </span><span class="COMM">/**
<span class='line'>121</span>  * The message timestamp
<span class='line'>122</span>  *
<span class='line'>123</span>  * @name Stream#timestamp
<span class='line'>124</span>  * @field
<span class='line'>125</span>  * @type Date
<span class='line'>126</span>  */</span><span class="WHIT">
<span class='line'>127</span> 
<span class='line'>128</span> 
<span class='line'>129</span> </span><span class="COMM">/**
<span class='line'>130</span>  * Specify quality of service.
<span class='line'>131</span>  *
<span class='line'>132</span>  * This method requests a specific quality of service.  The QoS can
<span class='line'>133</span>  *     be specified for the current channel or for all channels on the
<span class='line'>134</span>  *     connection.  The particular properties and semantics of a qos method
<span class='line'>135</span>  *     always depend on the content class semantics.  Though the qos method
<span class='line'>136</span>  *     could in principle apply to both peers, it is currently meaningful
<span class='line'>137</span>  *     only for the server.
<span class='line'>138</span>  *
<span class='line'>139</span>  * @name Stream#qos
<span class='line'>140</span>  * @function
<span class='line'>141</span>  * @param {Number} prefetchSize The client can request that messages be sent in advance so that
<span class='line'>142</span>  *       when the client finishes processing a message, the following
<span class='line'>143</span>  *       message is already held locally, rather than needing to be sent
<span class='line'>144</span>  *       down the channel.  Prefetching gives a performance improvement.
<span class='line'>145</span>  *       This field specifies the prefetch window size in octets. May be
<span class='line'>146</span>  *       set to zero, meaning "no specific limit".  Note that other
<span class='line'>147</span>  *       prefetch limits may still apply.
<span class='line'>148</span>  * @param {Number} prefetchCount Specifies a prefetch window in terms of whole messages.  This
<span class='line'>149</span>  *       field may be used in combination with the prefetch-size field;
<span class='line'>150</span>  *       a message will only be sent in advance if both prefetch windows
<span class='line'>151</span>  *       (and those at the channel and connection level) allow it.
<span class='line'>152</span>  * @param {Number} consumeRate Specifies a desired transfer rate in octets per second. This is
<span class='line'>153</span>  *       usually determined by the application that uses the streaming
<span class='line'>154</span>  *       data.  A value of zero means "no limit", i.e. as rapidly as
<span class='line'>155</span>  *       possible.
<span class='line'>156</span>  * @param {Boolean} global By default the QoS settings apply to the current channel only.  If
<span class='line'>157</span>  *       this field is set, they are applied to the entire connection.
<span class='line'>158</span>  */</span><span class="WHIT">
<span class='line'>159</span> 
<span class='line'>160</span> </span><span class="COMM">/**
<span class='line'>161</span>  * Start a queue consumer.
<span class='line'>162</span>  *
<span class='line'>163</span>  * This method asks the server to start a "consumer", which is a
<span class='line'>164</span>  *     transient request for messages from a specific queue. Consumers
<span class='line'>165</span>  *     last as long as the channel they were created on, or until the
<span class='line'>166</span>  *     client cancels them.
<span class='line'>167</span>  *
<span class='line'>168</span>  * @name Stream#consume
<span class='line'>169</span>  * @function
<span class='line'>170</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'>171</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'>172</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'>173</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'>174</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'>175</span>  *     underscores.
<span class='line'>176</span>  * @param {String} consumerTag Identifier for the consumer, valid within the current connection.
<span class='line'>177</span>  * @param {Boolean} noLocal If the no-local field is set the server will not send messages to
<span class='line'>178</span>  *     the client that published them.
<span class='line'>179</span>  * @param {Boolean} exclusive Request exclusive consumer access, meaning only this consumer can
<span class='line'>180</span>  *       access the queue.
<span class='line'>181</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'>182</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'>183</span>  *     method it will raise a channel or connection exception.
<span class='line'>184</span>  */</span><span class="WHIT">
<span class='line'>185</span> 
<span class='line'>186</span> </span><span class="COMM">/**
<span class='line'>187</span>  * End a queue consumer.
<span class='line'>188</span>  *
<span class='line'>189</span>  * This method cancels a consumer.  Since message delivery is
<span class='line'>190</span>  *     asynchronous the client may continue to receive messages for
<span class='line'>191</span>  *     a short while after canceling a consumer.  It may process or
<span class='line'>192</span>  *     discard these as appropriate.
<span class='line'>193</span>  *
<span class='line'>194</span>  * @name Stream#cancel
<span class='line'>195</span>  * @function
<span class='line'>196</span>  * @param {String} consumerTag Identifier for the consumer, valid within the current connection.
<span class='line'>197</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'>198</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'>199</span>  *     method it will raise a channel or connection exception.
<span class='line'>200</span>  */</span><span class="WHIT">
<span class='line'>201</span> 
<span class='line'>202</span> </span><span class="COMM">/**
<span class='line'>203</span>  * Publish a message.
<span class='line'>204</span>  *
<span class='line'>205</span>  * This method publishes a message to a specific exchange. The message
<span class='line'>206</span>  *     will be routed to queues as defined by the exchange configuration
<span class='line'>207</span>  *     and distributed to any active consumers as appropriate.
<span class='line'>208</span>  *
<span class='line'>209</span>  * @name Stream#publish
<span class='line'>210</span>  * @function
<span class='line'>211</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'>212</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'>213</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'>214</span>  * @param {String} exchange The exchange name is a client-selected string that identifies
<span class='line'>215</span>  *       the exchange for publish methods.  Exchange names may consist
<span class='line'>216</span>  *       of any mixture of digits, letters, and underscores.  Exchange
<span class='line'>217</span>  *       names are scoped by the virtual host.
<span class='line'>218</span>  * @param {String} routingKey Specifies the routing key for the message.  The routing key is
<span class='line'>219</span>  *       used for routing messages depending on the exchange configuration.
<span class='line'>220</span>  * @param {Boolean} mandatory This flag tells the server how to react if the message cannot be
<span class='line'>221</span>  *       routed to a queue.  If this flag is set, the server will return an
<span class='line'>222</span>  *       unroutable message with a Return method.  If this flag is zero, the
<span class='line'>223</span>  *       server silently drops the message.
<span class='line'>224</span>  * @param {Boolean} immediate This flag tells the server how to react if the message cannot be
<span class='line'>225</span>  *       routed to a queue consumer immediately.  If this flag is set, the
<span class='line'>226</span>  *       server will return an undeliverable message with a Return method.
<span class='line'>227</span>  *       If this flag is zero, the server will queue the message, but with
<span class='line'>228</span>  *       no guarantee that it will ever be consumed.
<span class='line'>229</span>  */</span><span class="WHIT">
<span class='line'>230</span> 
<span class='line'>231</span> </span></pre></body></html>